[NTG-context] Re: how to apply metapost effects to section title?

2024-04-09 Thread Wolfgang Schuster
seyal.zav...@gmail.com schrieb am 09.04.2024 um 14:53: i want to produce a gradient header i tried this code but it does not produce any result: \startext \def\Mystyle#1{\startMPcode picture tt ; tt := lmt_outline [ kind = "path", text = "#1", ] ; fill for i within tt :

[NTG-context] how to apply metapost effects to section title?

2024-04-09 Thread seyal . zavira
i want to produce a gradient header i tried this code but it does not produce any result: \startext \def\Mystyle#1{\startMPcode picture tt ; tt := lmt_outline [ kind = "path", text = "#1", ] ; fill for i within tt : pathpart i && endfor cycle withshademethod "linear"

[NTG-context] Re: MetaPost lines in tables?

2024-02-22 Thread Henning Hraban Ramm
{10}{ \bTR \bTD\strut \eTD\bTD \eTD\bTD \eTD \eTR } \eTABLE """ Hraban%D \module %D [ file=mp-sketch.mp %Dversion=2021.05.13 %D title=\CONTEXT\ \METAPOST\ graphics, %D subtitle=Sketch drawing, %D author=Aditya Mahajan, %D date=\

[NTG-context] Re: MetaPost lines in tables?

2024-02-22 Thread Hans Hagen via ntg-context
On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote: Am 21.02.24 um 19:43 schrieb Wolfgang Schuster: … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder}    draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed

[NTG-context] Re: MetaPost lines in tables?

2024-02-21 Thread Henning Hraban Ramm
Am 21.02.24 um 19:43 schrieb Wolfgang Schuster: … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder}   draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red";   setbounds currentpicture

[NTG-context] Re: MetaPost lines in tables?

2024-02-21 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 21.02.2024 um 19:04: Am 19.02.24 um 23:15 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics

[NTG-context] Re: MetaPost lines in tables?

2024-02-21 Thread Henning Hraban Ramm
Am 19.02.24 um 23:15 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame

[NTG-context] Re: MetaPost lines in tables?

2024-02-19 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame-less TABLE; it will probably work, but it’s

[NTG-context] MetaPost lines in tables?

2024-02-19 Thread Henning Hraban Ramm
I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame-less TABLE; it will probably work, but it’s a crutch… Hraban

[NTG-context] Re: Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Emanuel Han via ntg-context
Thanks Mikael. This helped indeed. I updated my example on the Metapost page in the wiki accordingly. The`pagestate=start` functionality is not documented in the wiki. It's not clear for which context commands it can or should be used. Who is willing to help out here? Best regards Emanuel

[NTG-context] Re: Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Mikael Sundqvist
e numbering in a pdf > viewer? > > On Feb. 17 2024, at 11:03 am, Emanuel Han via ntg-context > wrote: > > I think I could solve all the problems. Attached the finalized working > example. I created the > https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_p

[NTG-context] Fwd: Re: Working with layer sets with Metapost

2024-02-19 Thread Emanuel Han via ntg-context
created the https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry with it. Feel free to modify.CheersEmanuelOn Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote:Hi,not sure I get what you are missing. But you can trysetbounds currentpicture to (fullsquare scaled 200) ;in base

[NTG-context] Re: Working with layer sets with Metapost

2024-02-17 Thread Emanuel Han via ntg-context
I think I could solve all the problems. Attached the finalized working example. I created the https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry with it. Feel free to modify. Cheers Emanuel On Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote: > Hi, > > n

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Mikael Sundqvist
Emanuel Han via ntg-context wrote: > > Resp. the solution should be such that each generated PDF page has the same > dimension, the same background colour and a page number and the metapost > content on each page has the same scaling factor. > > On Feb. 15 2024, at 11:10 pm, E

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
Resp. the solution should be such that each generated PDF page has the same dimension, the same background colour and a page number and the metapost content on each page has the same scaling factor. On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context wrote: > Dear Mikael, > > I

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
Dear Mikael, I actually need to keep the \dorecurse mechanism of the mwe (from line 44 on), because I need the "setbounds currentpicture to TheFrame" and also because I need page numbering inside the MPpage, as done with draw textext(decimal(currentime)). So, how can I use the

[NTG-context] Re: Working with layer sets with Metapost

2024-02-15 Thread Emanuel Han via ntg-context
Dear Mikael, thanks a lot! this seems to be the solution! And it looks beatiful enough to me  I'll try to port all my layers to this new method and see if I run into new problems again  Emanuel On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > Hi > > On Thu, Feb 15, 2024 at 1:03 AM

[NTG-context] Re: Working with layer sets with Metapost

2024-02-14 Thread Mikael Sundqvist
Hi On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context wrote: > > Dear list, > > the attached .tex file is the minimal working example we discussed today in > the online meeting. > > I realized that the approach of looping through k of p[k] is not fitting my > needs, because it's not

[NTG-context] Working with layer sets with Metapost

2024-02-14 Thread Emanuel Han via ntg-context
Dear list, the attached .tex file is the minimal working example we discussed today in the online meeting. I realized that the approach of looping through k of p[k] is not fitting my needs, because it's not flexible enough. I need another approach, one which works with layer sets. I would stop

[NTG-context] Re: Metapost docs

2024-01-11 Thread Hans Hagen
On 1/11/2024 4:54 PM, Shiv Shankar Dayal wrote: Dear Gavin, I am aware of these resources. My question is about docs of those Metapost libs which are in the distribution in Metapost directory. If something is not in the metafun, luametafun or another manual, then you should not use it as it's

[NTG-context] Re: Metapost docs

2024-01-11 Thread Shiv Shankar Dayal
Dear Gavin, I am aware of these resources. My question is about docs of those Metapost libs which are in the distribution in Metapost directory. On Thu, Jan 11, 2024 at 9:12 PM Gavin via ntg-context wrote: > Hi Shiv, > > I am working with MetaPost in ConTeXt. Here are the resour

[NTG-context] Re: Metapost docs

2024-01-11 Thread Gavin via ntg-context
Hi Shiv, I am working with MetaPost in ConTeXt. Here are the resources I use, roughly in the order I search when trying to solve a problem. - MetaFun Manual (http://www.pragma-ade.nl/general/manuals/metafun-p.pdf) This is most comprehensive and helpful source. - MetaPost Manual (http

[NTG-context] Re: Metapost docs

2024-01-10 Thread shivshankar . dayal
I have files in my installation like 'mp-form.mkiv, mp-chem.mkiv' and so on. -- Respect, Shiv Shankar Dayal ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

[NTG-context] Lua and inject.path to make a disconnected MetaPost path?

2024-01-08 Thread Gavin via ntg-context
Hello LuaMetaFun Fans, Can I use mp.inject.path in Lua to create a disconnected path in MetaPost? This is for my module that draws globes. I currently do something like this for drawing the continents. (This MWE has two triangular continents.) \startluacode continents = {} continents[1

[NTG-context] Re: Metapost docs

2024-01-08 Thread Hans Hagen via ntg-context
On 1/8/2024 1:50 AM, Shiv Shankar Dayal wrote: I see many libraries for Metapost in Context source. Where are these documented? I see Metafun manual as well, but I do not find all the included libraries described. i'm not sure what you mean with library ... can you give an example? Hans

[NTG-context] Metapost docs

2024-01-07 Thread Shiv Shankar Dayal
I see many libraries for Metapost in Context source. Where are these documented? I see Metafun manual as well, but I do not find all the included libraries described. -- Respect, Shiv Shankar Dayal ___ If your

[NTG-context] Re: Metapost: draw only subpath; changing thickness of line

2024-01-06 Thread Emanuel Han via ntg-context
Hi Taco, thanks for your help. This works for me! On Jan. 5 2024, at 2:13 pm, Taco Hoekwater wrote: > Hi, > > Here is 'a' way to draw the subpath, at least. I do not have time to come up > with a nice “thicker in the middle” solution. > Best wishes, > Taco > > > \startMPcode > numeric u; u=1cm;

[NTG-context] Re: multipage metapost output from ConTeXt

2024-01-06 Thread Emanuel Han via ntg-context
> > > >> path A; A = z0..z1..z2..z3..z4 ; > > >> pair AStartPoint; AStartPoint = point 0 of A; > > >> pair AEndPoint; AEndPoint = point 4 of A; > > >> path B; B = z5..z6; > > >> pair BStartPoint; BStartPoint = point 0 of B; > > >

[NTG-context] Re: Metapost: draw only subpath; changing thickness of line

2024-01-05 Thread Taco Hoekwater
Hi, Here is 'a' way to draw the subpath, at least. I do not have time to come up with a nice “thicker in the middle” solution. Best wishes, Taco \startMPcode numeric u; u=1cm; %equiangular spiral numeric a, k ; a = 2.3; %scaling factor k = 8.61722335; path S; S = right for t=1 upto 360: .. a

[NTG-context] Metapost: draw only subpath; changing thickness of line

2024-01-05 Thread Emanuel Han via ntg-context
Hi all, I have this MWE. Now I want to draw only the subpath of S between gong6 and gong7 with a red line which is narrower at the two ends and thicker in the middle part. How to achieve this? Thanks! Emanuel \setuppapersize[A4,landscape] \starttext \startMPcode numeric u; u=1cm; %equiangular

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-04 Thread Fabrice L
t = "\JapaneseFont 日本語" > >> ], AEndPoint);); > >> > >> p3:=image( > >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, > >> BStartPoint); > >> ); > >> > >> p4:=image(draw A; label(lmt_outline

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
gt; > >> z3 = (10,70); > > >> z4 = (30,50); > > >> z5 = (90,70); > > >> z6 = (-10,70); > > >> > > >> path A; A = z0..z1..z2..z3..z4 ; > > >> pair AStartPoint; AStartPoint = point 0 of A; > > >> pair AEn

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
t;> > >> p2:=image(draw A; label(lmt_outline [ > >> text = "\JapaneseFont 日本語" > >> ], AEndPoint);); > >> > >> p3:=image( > >> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, > >> BStartPoint); >

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
>> label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, > >> BStartPoint); > >> ); > >> > >> p4:=image(draw A; label(lmt_outline [ > >> text = "\KoreanFont 한국어" > >> ], AStartPoint);); > >>

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Mikael Sundqvist
mage( >> draw B withcolor blue; >> ); >> \stopMPinclusions >> >> \starttext >> >> \dorecurse{6}{ % Frame >> \setupMPpage[background=color, backgroundcolor=SpringGreen] >> \startMPpage[pagestate=start] >> currentime := #1 ; >>

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread fv leung
n) withcolor > magenta ; > for k=1 upto currentime: draw p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage &

[NTG-context] Re: multipage metapost output from ConTeXt

2023-12-02 Thread Emanuel Han via ntg-context
t := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage > } > > \stoptext > On Nov. 27 2023, at 11:25 pm, Aditya Mahajan wrote: > > On Mon, 27 Nov 2023, Fabrice L wrote: >

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-29 Thread Emanuel Han via ntg-context
e L wrote: > > > Hi, > > > > It is fun fact very easy to do. You just use \startMPpage (…) \stopMPpage > > multiple times. Here is an example which build an animation of a particle > > moving according to a Brownian motion. > > A very similar option is to pass a variabl

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-27 Thread Aditya Mahajan
pass a variable to a metapost drawing. This is what I use: https://adityam.github.io/context-blog/post/metapost-animation/ It only works when viewed in acrobat, you can just comment out the animation part and wrap it in \startTEXpage .. \stopTEXpage to get multi

[NTG-context] Re: multipage metapost output from ConTeXt

2023-11-27 Thread Fabrice L
0;% In pixels (will be converted by default at 72dpi) currentpicture := currentpicture xysized (desiredformat ,desiredformat ); \stopMPpage } \stoptext % 8< --- > Le 27 nov. 2023 à 13:49, Emanuel Han via ntg-context a > écrit : > > How can

[NTG-context] multipage metapost output from ConTeXt

2023-11-27 Thread Emanuel Han via ntg-context
How can I achieve multipage metapost output from ConTeXt? The result should be a multipage pdf. It contains just a metapost graphic per page. The graphic has always the same bounding box and evolves from page to page: Some elements to be drawn are added, and some others would ideally also

[NTG-context] Re: Metapost label text surrounded by white border

2023-11-20 Thread Emanuel Han via ntg-context
white 1mm thick border in a Metapost >> label. Here is my code, which doesn't draw the border at all and which draws >> the text in white instead of black (I'm using mkiv and mkxl version >> 2023.09.26 18:19 on osx-arm6): >> | >> |beginfig(1); >> %

[NTG-context] Re: Metapost label text surrounded by white border

2023-11-19 Thread Henning Hraban Ramm
Am 19.11.23 um 16:41 schrieb Emanuel Han via ntg-context: I'd like to surround black text with a white 1mm thick border in a Metapost label. Here is my code, which doesn't draw the border at all and which draws the text in white instead of black (I'm using mkiv and mkxl version 2023.09.26 18

[NTG-context] Metapost label text surrounded by white border

2023-11-19 Thread Emanuel Han via ntg-context
I'd like to surround black text with a white 1mm thick border in a Metapost label. Here is my code, which doesn't draw the border at all and which draws the text in white instead of black (I'm using mkiv and mkxl version 2023.09.26 18:19 on osx-arm6): beginfig(1); % Define the text and colors

[NTG-context] Re: [ metapost -> svg ]

2023-11-07 Thread vm via ntg-context
On 07/11/2023 14:54, Lutz Haseloff wrote: mutool convert -o metapost.svg -O text=path metapost.pdf Hope it helps a little yes, mutool was the key to remember. thanks! .F ___ If your question is of interest to

[NTG-context] Re: [ metapost -> svg ]

2023-11-07 Thread Lutz Haseloff
Hi Floris, directly generating SVG with ConTeXt LMTX is not possible. But, using LMTX to generate SVGs has some advantages over MPOST. You can use ConTeXt's advanced color management (transparency and more) and you can use the very nice font management. So my "metapost" file is: \s

[NTG-context] [ metapost -> svg ]

2023-11-05 Thread vm via ntg-context
With the latest lmtx installed, what would be the correct cli command to generate a svg outputfile from a metapost source? .Floris ___ If your question is of interest to others as well, please add an entry

[NTG-context] Re: Gray gradient with Metapost

2023-10-07 Thread Keith McKay
r: >      > Hi, >      > I would like to obtain, if possible, a gray gradient like in the >     image. >      > My code uses Metapost but maybe this is possible with Metafun. > >     Have a look into the Metafun manual, chapter 8.1 “shading”.

[NTG-context] Re: Gray gradient with Metapost

2023-10-07 Thread Fabrice Couvreur
> > Best Wishes > > Keith > > > > On Thu, 5 Oct 2023, 20:52 Henning Hraban Ramm, > <mailto:te...@fiee.net>> wrote: > > > > Am 05.10.23 um 21:50 schrieb Fabrice Couvreur: > > > Hi, > > > I would like to obtain, if possi

[NTG-context] Re: Gray gradient with Metapost

2023-10-06 Thread Henning Hraban Ramm
, if possible, a gray gradient like in the image. > My code uses Metapost but maybe this is possible with Metafun. Have a look into the Metafun manual, chapter 8.1 “shading”. Hraban ___ If your question

[NTG-context] Re: Gray gradient with Metapost

2023-10-06 Thread Keith McKay
in, if possible, a gray gradient like in the image. > > My code uses Metapost but maybe this is possible with Metafun. > > Have a look into the Metafun manual, chapter 8.1 “shading”. > > Hraban > > > ___

[NTG-context] Re: How can I use a variable for a MetaPost coordinate ?

2023-10-05 Thread peter.hopcroft--- via ntg-context
Yes, indeed. The metafun manual also explains things about overlays and layers I hadn't known. I'd previously ignored that manual. Thank you, Peter > On 5/10/2023, at 7:05 PM, Thomas A. Schmitz > wrote: > > Have a look at chapter 6.4 of the metafun manual. You need StartPage ... > StopPage

[NTG-context] Re: Gray gradient with Metapost

2023-10-05 Thread Henning Hraban Ramm
Am 05.10.23 um 21:50 schrieb Fabrice Couvreur: Hi, I would like to obtain, if possible, a gray gradient like in the image. My code uses Metapost but maybe this is possible with Metafun. Have a look into the Metafun manual, chapter 8.1 “shading”. Hraban

[NTG-context] Gray gradient with Metapost

2023-10-05 Thread Fabrice Couvreur
Hi, I would like to obtain, if possible, a gray gradient like in the image. My code uses Metapost but maybe this is possible with Metafun. Thanks. Fabrice \starttext \startMPcode u=1.2cm; interim ahangle := 30; z0=(0,0); z1=(3u,0

[NTG-context] Re: How can I use a variable for a MetaPost coordinate ?

2023-10-05 Thread Thomas A. Schmitz
Have a look at chapter 6.4 of the metafun manual. You need StartPage ... StopPage in your MPcode, then you can knock yourself out by using variables such as PaperHeight or TextHeight and do all sorts of calculations. All best Thomas On 10/5/23 05:54, peter.hopcroft--- via ntg-context wrote:

[NTG-context] How can I use a variable for a MetaPost coordinate ?

2023-10-04 Thread peter.hopcroft--- via ntg-context
Hello list, I want to draw lines on a page. I want to pass my line coordinates as a percent of \width or \textheight, rather than as millimetres. So that if I change the page size I don't need to change the coordinates. The MWE below compiles but the pdf does not have any lines drawn on it.

[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Duncan Hothersall
I am in awe at this. Thanks for sharing. On Wed, 19 Jul 2023 at 18:11, Henning Hraban Ramm wrote: > Am 19.07.23 um 14:07 schrieb Taco Hoekwater: > > First, find the actual point along the curve of the wave you want, then > you can ask for the direction of the wave at that time, and its point: >

[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Henning Hraban Ramm
Am 19.07.23 um 14:07 schrieb Taco Hoekwater: First, find the actual point along the curve of the wave you want, then you can ask for the direction of the wave at that time, and its point: Thank you! pair itime, iangle, boatpos; itime = (wave[3] intersectiontimes

[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Taco Hoekwater
Hi, First, find the actual point along the curve of the wave you want, then you can ask for the direction of the wave at that time, and its point: \startuseMPgraphic{Waves} numeric height,stops,yoffset; stops := 10; height := OverlayHeight/10; path wave[]; % storing waves draw

[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Floris van Manen via ntg-context
On 19/07/2023 12:32, Henning Hraban Ramm wrote: I find the waves not yet very convincing. Depending on the intended weather, I'd rather flatten the amplitudes out with the distance. Unlike mountains, waves do not get much higher at the horizon. .F

[NTG-context] enhancing MetaPost presentation progress graphics

2023-07-19 Thread Henning Hraban Ramm
Hi, I’d like a presentation progress indicator that looks like a boat on waves – and if it works, it can also become a bike on hills or a mars rover on dunes. But my math skills are lacking. Below’s a mostly working draft. * I find the waves not yet very convincing. Would it make sense to

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-20 Thread Lutz Haseloff via ntg-context
\starttext Test Test \definefont[bahnlight][name:bahnschriftlight*default] \startMPcode picture pic; pic := thelabel(textext("\bahnlight This is Bahnschrift light in Metafont 0123456789"), (0, 0)); draw pic; \stopMPcode \stoptext Am 20. Januar 2023 18:28:23 MEZ schrieb Guido Bartolucci via

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-20 Thread Guido Bartolucci via ntg-context
And how do you set the light variation? On Fri, Jan 20, 2023 at 2:08 AM Lutz Haseloff via ntg-context < ntg-context@ntg.nl> wrote: > Hi Guido, > > > this works here: > > \starttext > Test Test > > \usemodule[fonts-variable] > \definefontfamily [mainface] [ss] [bahnschrift] >

Re: [NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-19 Thread Lutz Haseloff via ntg-context
Hi Guido, this works here: \starttext Test Test \usemodule[fonts-variable] \definefontfamily [mainface] [ss] [bahnschrift] \setupbodyfont[mainface] \ss 123456789 Wild! \medskip \startMPcode picture pic; pic := thelabel(textext("\ss This is in Metafont 0123456789"), (0, 0)); draw pic;

[NTG-context] What's the current method for using a variable font in Context and Metapost?

2023-01-19 Thread Guido Bartolucci via ntg-context
I haven't been able to find working examples. Here is some sample code. I would really like to be able to use the light variation of this DIN-like font. \usemodule[fonts-variable] \definefontfamily [mainface] [ss] [bahnschrift] \setupbodyfont[mainface] \starttext \ss 123456789 Wild! \medskip

Re: [NTG-context] MetaPost cutdraw

2022-07-06 Thread Mikael Sundqvist via ntg-context
>> > >>> Hi, I’m trying to understand MetaPost better. > >>> > >>> I’d like to draw a fat line that’s cut at its end points. > >> > >> You mean like linecap = butt? > > Yes, but that doesn’t behave differently. > > > &g

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Henning Hraban Ramm via ntg-context
Am 06.07.22 um 15:24 schrieb Fabrice L: Here are slightly different syntax that could be useful perhaps ? In the second one, the scaled parameter can be replaced easily with a variable, so you can decide and change the size of the label during the course of a picture. Thank you (all), I

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Fabrice L via ntg-context
> Le 5 juill. 2022 à 19:00, Henning Hraban Ramm via ntg-context > a écrit : > > How can I change the font size of labels within one picture? > > Hraban > > \startMPpage > defaultfont := "\truefontname{Sans}"; > defaultfontsize := \the\bodyfontsize; > > label.top(defaultfontsize, (0,0)); >

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Hans Hagen via ntg-context
On 7/6/2022 1:36 PM, Henning Hraban Ramm via ntg-context wrote: Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode    label("normal label", (0, 0));   

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread fv leung via ntg-context
I've used something like the following before. \starttext \startMPcode label("normal label", (0, 0)); label("{\switchtobodyfont[3pt] tiny label}", (0, 18)); label("{\switchtobodyfont[72pt] giant label}", (0, -72)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Henning Hraban Ramm via ntg-context
Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode    label("normal label", (0, 0));    label("\setsmallbodyfont small label", (0, 18));   

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Hans Hagen via ntg-context
On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: My stupid way to get labels of different sizes: \starttext \startMPcode   label("normal label", (0, 0));   label("\setsmallbodyfont small label", (0, 18));   label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread fv leung via ntg-context
My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於 2022年7月6日 週三 下午5:23寫道: >

Re: [NTG-context] MetaPost cutdraw

2022-07-06 Thread Henning Hraban Ramm via ntg-context
Am 06.07.22 um 09:15 schrieb Hans Hagen via ntg-context: On 7/6/2022 7:10 AM, Aditya Mahajan via ntg-context wrote: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: Hi, I’m trying to understand MetaPost better. I’d like to draw a fat line that’s cut at its end points. You

Re: [NTG-context] MetaPost label font size

2022-07-06 Thread Henning Hraban Ramm via ntg-context
Am 06.07.22 um 07:17 schrieb Aditya Mahajan via ntg-context: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: How can I change the font size of labels within one picture? (Untested): See https://www.contextgarden.net/Command/setupMPinstance

Re: [NTG-context] MetaPost cutdraw

2022-07-06 Thread Hans Hagen via ntg-context
On 7/6/2022 7:10 AM, Aditya Mahajan via ntg-context wrote: On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: Hi, I’m trying to understand MetaPost better. I’d like to draw a fat line that’s cut at its end points. You mean like linecap = butt? \startMPpage[offset=5mm] path p

Re: [NTG-context] MetaPost label font size

2022-07-05 Thread Aditya Mahajan via ntg-context
On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > How can I change the font size of labels within one picture? (Untested): See https://www.contextgarden.net/Command/setupMPinstance \setupMPinstance[metafun][textstyle=sans] Or define a new instance, which sets the textstyle to

Re: [NTG-context] MetaPost cutdraw

2022-07-05 Thread Aditya Mahajan via ntg-context
On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > Hi, I’m trying to understand MetaPost better. > > I’d like to draw a fat line that’s cut at its end points. You mean like linecap = butt? \startMPpage[offset=5mm] path p; p := origin -- (7cm,0); interim lineca

[NTG-context] MetaPost label font size

2022-07-05 Thread Henning Hraban Ramm via ntg-context
How can I change the font size of labels within one picture? Hraban \startMPpage defaultfont := "\truefontname{Sans}"; defaultfontsize := \the\bodyfontsize; label.top(defaultfontsize, (0,0)); defaultfontsize := 4bp; label.top(defaultfontsize, (50,0)); % shows that the variable changed, % but

[NTG-context] MetaPost cutdraw

2022-07-05 Thread Henning Hraban Ramm via ntg-context
Hi, I’m trying to understand MetaPost better. I’d like to draw a fat line that’s cut at its end points. I learned, “cutdraw” should do the trick, but I get a parallelogram instead of a rectangle. What’s wrong? Hraban \startMPpage draw (0,20)--(20,20) withpen pensquare scaled 10; cutdraw

Re: [NTG-context] Compiling a large metapost document

2022-06-02 Thread Stefan Nedeljkovic via ntg-context
Thanks for the advice, Hans. I'll try that! On Thu, Jun 2, 2022 at 12:17 PM Hans Hagen via ntg-context < ntg-context@ntg.nl> wrote: > On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote: > > > > > > On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote: > >> Sorry, i just updated

Re: [NTG-context] Compiling a large metapost document

2022-06-02 Thread Hans Hagen via ntg-context
On 6/1/2022 8:34 PM, Thomas A. Schmitz via ntg-context wrote: On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote: Sorry, i just updated the file, should now compile, but fail due to resources. Are the configuration options to context that would enable this file to be compiled? The

Re: [NTG-context] Compiling a large metapost document

2022-06-02 Thread Stefan Nedeljkovic via ntg-context
I just bumped it to double the size, did mtxrun --reload, context --generate and the error is still tex memory > bumping category 'token' failed, details: all=8000 | ini=4 We ran into troubles scanning an argument. On Thu, Jun 2, 2022 at 9:20 AM Thomas A. Schmitz via ntg-context <

Re: [NTG-context] Compiling a large metapost document

2022-06-02 Thread Thomas A. Schmitz via ntg-context
On 01.06.22 23:30, Stefan Nedeljkovic wrote: I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and running context --generate, context --make, but the error persists. I'm new to context and I don't know how to configure this file. Running --usage reveals in the log that the

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
I figured it out. I was wrongly calculating the page size argument for gs. Thank you very, very much again Max! On Thu, Jun 2, 2022 at 4:41 AM Stefan Nedeljkovic wrote: > There is one more problem: the pdf generated has incorrect margins. I > tried to manually calculate the size in ps points

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
There is one more problem: the pdf generated has incorrect margins. I tried to manually calculate the size in ps points and run gs directly, but the results are the same. How can I get an accurate rendering of the page? On Thu, Jun 2, 2022 at 4:22 AM Max Chernoff wrote: > On 2022-06-01 8:00

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Max Chernoff via ntg-context
On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote: Thank you very much Max! It works indeed! One more question. How would I import the eps file back into MPpage, so I could do trickery with text. Convert the PostScript file into PDF with either "ps2pdf" or GhostScript, then you can import the

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
Thank you very much Max! It works indeed! One more question. How would I import the eps file back into MPpage, so I could do trickery with text. ) On Thu, Jun 2, 2022 at 1:46 AM Max Chernoff wrote: > > I have a large .tex file with metapost embedded in it and want to c

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Max Chernoff via ntg-context
I have a large .tex file with metapost embedded in it and want to compile it, but it fails. Do you know of a way to compile it? Just use plain MetaPost: diff --git a/belgrade_gm.tex b/belgrade_gm.mp index 3281754..d536b64 100644 --- a/belgrade_gm.tex +++ b/belgrade_gm.mp

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Bruce Horrocks via ntg-context
> On 1 Jun 2022, at 22:30, Stefan Nedeljkovic via ntg-context > wrote: > > Dear Thomas, > > I'm sorry for all the shortcomings of my question. I'll try to be more > concrete. If you won't download my file, could you at least give me a hint on > how to configure LMTX? > > I Tried editing

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
Dear Thomas, I'm sorry for all the shortcomings of my question. I'll try to be more concrete. If you won't download my file, could you at least give me a hint on how to configure LMTX? I Tried editing the file context/tex/texmf/web2c/texmfcnf.lua, and running context --generate, context --make,

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Thomas A. Schmitz via ntg-context
On 6/1/22 22:15, Stefan Nedeljkovic via ntg-context wrote: The problem *is* the file size. There is not a minimal example, because everything works when there is less drawdot commands. There is 125000+ drawdot commands in the file. The run ends with the message: If you really absolutely need

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
P.S. Use the last link I posted, the updated file is there. On Wed, Jun 1, 2022 at 10:15 PM Stefan Nedeljkovic wrote: > The problem *is* the file size. There is not a minimal example, > because everything works when there is less drawdot commands. There is > 125000+ drawdot commands in the

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
The problem *is* the file size. There is not a minimal example, because everything works when there is less drawdot commands. There is 125000+ drawdot commands in the file. The run ends with the message: If you really absolutely need more capacity, you can ask a wizard to enlarge me. mtx-context

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Thomas A. Schmitz via ntg-context
On 6/1/22 19:35, Stefan Nedeljkovic via ntg-context wrote: Sorry, i just updated the file, should now compile, but fail due to resources. Are the configuration options to context that would enable this file to be compiled? The question still stands: what do you expect us to do? Hunt for a

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
ext < > ntg-context@ntg.nl> wrote: > > > > Just fixed the file, here is the new link: > https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing > > > > On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic > wrote: > > Dear list, >

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Bruce Horrocks via ntg-context
fan Nedeljkovic via ntg-context > wrote: > > Just fixed the file, here is the new link: > https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing > > On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic wrote: > Dear list, > > I have a large .t

Re: [NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
Just fixed the file, here is the new link: https://drive.google.com/file/d/16jTzHbaqxPmhgmNaDOBRijlhlmUCnH4j/view?usp=sharing On Wed, Jun 1, 2022 at 4:48 PM Stefan Nedeljkovic wrote: > Dear list, > > I have a large .tex file with metapost embedded in it and want to compile > it,

[NTG-context] Compiling a large metapost document

2022-06-01 Thread Stefan Nedeljkovic via ntg-context
Dear list, I have a large .tex file with metapost embedded in it and want to compile it, but it fails. Here is a link to the file (~12MB): https://drive.google.com/file/d/1t-6mxFmGp-nzpl0RrPgNFq8KRvpplgDv/view?usp=sharing Do you know of a way to compile it? BTW, the file is automatically

Re: [NTG-context] How to add margin around standalone MetaPost?

2022-05-24 Thread Vincent Hennebert via ntg-context
On Sat, 2022-05-21 at 07:39 +0530, śrīrāma wrote: > On 5/20/22 10:26 PM Vincent Hennebert via ntg-context wrote: > > Take the following MetaPost file: > > > > beginfig(0) > >   ahlength := 20; > >   linejoin := mitered; > >   drawarrow origin--(40,0)

  1   2   3   4   5   6   7   8   9   10   >